# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest do
  @moduledoc """
  Request message for the TrainProcessorVersion method.

  ## Attributes

  *   `baseProcessorVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
  *   `customDocumentExtractionOptions` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions.t`, *default:* `nil`) - Options to control Custom Document Extraction (CDE) Processor.
  *   `documentSchema` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3DocumentSchema.t`, *default:* `nil`) - Optional. The schema the processor version will be trained with.
  *   `foundationModelTuningOptions` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestFoundationModelTuningOptions.t`, *default:* `nil`) - Options to control foundation model tuning of a processor.
  *   `inputData` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData.t`, *default:* `nil`) - Optional. The input data used to train the ProcessorVersion.
  *   `processorVersion` (*type:* `GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ProcessorVersion.t`, *default:* `nil`) - Required. The processor version to be created.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :baseProcessorVersion => String.t() | nil,
          :customDocumentExtractionOptions =>
            GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions.t()
            | nil,
          :documentSchema =>
            GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3DocumentSchema.t()
            | nil,
          :foundationModelTuningOptions =>
            GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestFoundationModelTuningOptions.t()
            | nil,
          :inputData =>
            GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData.t()
            | nil,
          :processorVersion =>
            GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ProcessorVersion.t()
            | nil
        }

  field(:baseProcessorVersion)

  field(:customDocumentExtractionOptions,
    as:
      GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions
  )

  field(:documentSchema,
    as: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3DocumentSchema
  )

  field(:foundationModelTuningOptions,
    as:
      GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestFoundationModelTuningOptions
  )

  field(:inputData,
    as:
      GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData
  )

  field(:processorVersion,
    as: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3ProcessorVersion
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest do
  def decode(value, options) do
    GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DocumentAI.V1beta3.Model.GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
